#pragma once

#include <winsock2.h>
#include <ws2tcpip.h>
#pragma comment (lib, "Ws2_32.lib")
class CConnectSocket
{
	SOCKET connectSocket;
public:
	CConnectSocket(void);
	~CConnectSocket(void);
	bool Connect(const char *szServerAddr, const char *szServerPort);
	int Receive(void *lpBuffer, int nBufLen, int nFlag = 0);
	int Send(const void *lpBuffer, int nBufLen, int nFlag = 0);
	void Close();
	void Create(const SOCKET *pSock); 
	SOCKET& GetSocket();
};
